package com.yh.action;

import com.yh.entity.User;
import com.yh.services.IUserService;
import com.yh.services.impl.UserServiceImpl;
import lombok.Data;

import static com.opensymphony.xwork2.Action.SUCCESS;

@Data
public class UpdateLAction {
    private String id;
    private String pwd;
    private String repwd;

    public String execute(){
        IUserService iUserService=new UserServiceImpl();
        User user=new User();
        user.setCol_Id(Integer.parseInt(id));
        user.setCol_Pwd(repwd);
      int b=iUserService.updUser(user);
      if (b>0){
          return SUCCESS;
      }else{
          return "out";
      }
    }
}
